using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace PlatformShoot
{
    public class WinZone : MonoBehaviour
    {
        int playerLayerId;

        private void Start()
        {
            playerLayerId = LayerMask.NameToLayer("Player");
        }

        private void OnTriggerEnter2D(Collider2D other)
        {
            if (other != null && playerLayerId == other.gameObject.layer)
            {
                AudioManager.PlayWinAudio();
                GameManager.NextScene();
            }
        }
    }
}


